package objectzy;

import java.util.Arrays;

public class SplitDemo {
    public static void main(String[] args) {
        String line = "abc12222def447ggh";
        String[] data = line.split("[0-9]+");
        for (int i=0;i< data.length;i++){
            System.out.println(data[i]);
            System.out.println(Arrays.toString(data));


            line = "123.456.78";
            data = line.split("\\.");
            System.out.println(data);

            line = ".123.456.78...";
            data = line.split("\\.");
            System.out.println(Arrays.toString(data));
            System.out.println(data.length);


//        String line = "abc12222def447ggh";
//        String[] data = line.split("[0-9]+");
//        for (int i=0;i< data.length;i++){
//            System.out.println(data[i]);
//            System.out.println(Arrays.toString(data));
//
//
//            line = "123.456.78";
//            data = line.split("\\.");
//            System.out.println(data);
//
//            line = ".123.456.78...";
//            data = line.split("\\.");
//            System.out.println(Arrays.toString(data));
//            System.out.println(data.length);

        }
    }
}
